package com.qingke.Imp;

import java.util.List;

import com.saozhu.Dao.DataBase;
import com.saozhu.command.CustomerCommand;
import com.saozhu.pojo.Good;
import com.saozhu.pojo.Player;
import com.saozhu.utils.Console;


public class CustomerShowCommand extends CustomerCommand {

	public CustomerShowCommand(Player customer) {
		super(customer);
	}

	@Override
	public void execute() {
        while(true) {
    		String showCommand = Console.askUserInput("please choose command in(owner,order,goods)");
            if("owner".equals(showCommand)) {
            	DataBase.getInstance().showOwner(customer);
            	break;
            } else if("order".equals(showCommand)) {
            	DataBase.getInstance().showOwnerOrder(customer);
            	break;
            } else if("goods".equals(showCommand)) {            	
            	List<Good> goods = DataBase.getInstance().showGood();
            	Console.println(goods);
            	break;
            } else {
            	Console.println("invalid command,print again please!");
            }
        }

	}

}
